<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>一键通首页</title>
<%@ include file="/WEB-INF/views/layout/public_css.jsp"%>
<%@ include file="/WEB-INF/views/layout/public_js.jsp"%>
<style type="text/css">
.font-red {
	color: red;
}

.hot-sale {
	margin: 15px;
}

.main-img {
	background-image: url("${ctx}/public/img/zc.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	height: 200px;
}

.big-box {
	border: 1px solid #ddd;
	height: 340px;
	margin-bottom: 10px;
	padding: 10px;
}

.zc-table>tbody>tr>td {
	border-bottom: 1px solid #ddd;
}
.nav-item {
	height:40px;
	padding:5px 10px ;
	font-size: 16px;
	border: 1px solid #ddd;
	cursor: pointer;
}
.thumbnail {
	margin-bottom: 0;
}
.img-area .thumbnail {
	padding: 0;
}
.second-nav {
	position: absolute;
	right:-300px;
	width: 300px;
	top:0;
	z-index:100;
	background-color: #fff;
	border: 1px solid #ddd;
	padding: 10px;
	display: none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
	$("#nav-item1").hover(function(){
      $("#details-item1").css("display","block");
   },function(){
	      $("#details-item1").css("display","none");
   });
});

</script>
</head>
<body>
<%@ include file="/WEB-INF/views/layout/head.jsp"%>
<div class="container-fluid">
    <div class="list-title">
    	一键通
    </div>
   	<div class="main-img">
   	<a href="${ctx}/civil/toOnekeyInfo"><img src="${ctx}/${sessionScope.oneKeyPic.oneKeyPic}" alt="..." style="width:100%; height:200px"></a>
	</div>
    <div class="row">
	  <div class="col-md-8" style="padding-right:0">
	  	<div class="big-box">
		  	<div class="row">
	  			<div class="col-md-10"><h4 >新闻快讯</h4></div>
	  			<div class="col-md-2"><a href="${ctx}/civil/getCMByPlate?plate=一键通快讯"><button type="button" class="btn btn-default">更多>></button></a></div>
	  		</div>
		  	<hr style="margin-top: 0px;margin-bottom: 10px;border-top: 2px solid #eee;">
		  	<div class="row">
		    	<div class="col-md-5" style="height:280px">
		    		<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="height:240px">
					  <!-- Indicators -->
					  <ol class="carousel-indicators">
					    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
					    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
					    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
					  </ol>
					
					  <!-- Wrapper for slides -->
					  <div class="carousel-inner" role="listbox">
						<c:forEach items="${kuaixunpic}" var="pol">
							
						 	<c:if test="${pol.plate == '一键通快讯' && pol.picPosition == '1' }"> 
							    <div class="item active">
							      <a href="${pol.address}"> <img src="${ctx}/${pol.picName}" alt="..." style="height:240px"></a>
							      <div class="carousel-caption">
							      </div>
							    </div>
						    </c:if>
						    <c:if test="${pol.plate == '一键通快讯' && pol.picPosition == '2' }"> 
							    <div class="item">
							      <a href="${pol.address}"> <img src="${ctx}/${pol.picName}" alt="..." style="height:240px"></a>
							      <div class="carousel-caption">
							      </div>
							    </div>
						    </c:if>
						    <c:if test="${pol.plate == '一键通快讯' && pol.picPosition == '3' }"> 
							    <div class="item">
							      <a href="${pol.address}"> <img src="${ctx}/${pol.picName}" alt="..." style="height:240px"></a>
							      <div class="carousel-caption">
							      </div>
							    </div>
						    </c:if>
						  </c:forEach>
					  </div>
					
					  <!-- Controls -->
					  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
					    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
					    <span class="sr-only">Previous</span>
					  </a>
					  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
					    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
					    <span class="sr-only">Next</span>
					  </a>
					</div>
					<p class="text-center">新闻图片说明</p>
		    	</div>
		    	<div class="col-md-7">
		    	   <table class="table nav-table zc-table">
		    	   		<col width="70%"></col>
						<col width="30%"></col>
						<c:if test="${empty kuaixun}">							
							<tr>
						  		<td></td>
						  		<td></td>
							</tr>
						</c:if>
						<c:if test="${not empty kuaixun}">
							<c:forEach items="${kuaixun}" var="pol"> 
								<c:if test="${pol.plate == '一键通快讯'}">
									<tr>
								  		<td><a href="${ctx}/civil/getCM?id=${pol.id}">${pol.title} </a></td>
								  		<td>${pol.createTime}</td>
									</tr>
								</c:if>
							</c:forEach>
						</c:if>
				   </table>
		    	</div>
	    	</div>
	  	</div>
	  </div>
	  <div class="col-md-4" style="padding-left:0">
	  	<div class="big-box">
	  		<div class="row">
	  			<div class="col-md-8"><h4 >产品/服务提供商</h4></div>
	  			<div class="col-md-4"><a href="${ctx}/civil/getAllUser"><button type="button" class="btn btn-default">更多>></button></a></div>
	  		</div>
		  	<hr style="margin-top: 0px;margin-bottom: 10px;border-top: 2px solid #eee;">
			<table class="table nav-table zc-table">
					<%
				List<User> suppliers = (List<User>) request.getAttribute("supplier");
				for(User p: suppliers)
				{
				 %>
		            <tr><td><%=p.getInstitutionName() %></td></tr>
		         <%
						}
				 %>
			</table>
	  	</div>
	  </div>	  
	</div><!-- row-end -->
	<div style="padding:10px;border: 1px solid #ddd;">
		
		<div class="row">
			<div class="col-md-6" style="height:280px;border-right: 1px solid #ddd;">
				<div class="row">
	  			<div class="col-md-8"><h4 >一键通服务及产品内容</h4></div>
	  			<div class="col-md-4"><a href="${ctx}/civil/getCMByPlate?plate=一键通产品"><button type="button" class="btn btn-default">更多>></button></a></div>
	  		</div>		
				<hr style="margin-top: 0px;margin-bottom: 10px;border-top: 2px solid #eee;">
				<table class="table nav-table zc-table">
					<col width="70%"></col>
					<col width="30%"></col>
				<c:if test="${empty kuaixun}">							
					<tr>
				  		<td></td>
				  		<td></td>
					</tr>
				</c:if>
				<c:if test="${not empty kuaixun}">
					<c:forEach items="${kuaixun}" var="pol"> 
						<c:if test="${pol.plate == '一键通产品'}">
							<tr>
						  		<td><a href="${ctx}/civil/getCM?id=${pol.id}">${pol.title} </a></td>
						  		<td>${pol.createTime}</td>
							</tr>
						</c:if>
					</c:forEach>
				</c:if>
			
			</table>
			</div>
			<div class="col-md-6" style="height:280px;border-left: 1px solid #ddd;">
				<div class="row">
	  			<div class="col-md-8"><h4 >一键通活动</h4></div>
	  			<div class="col-md-4"><a href="${ctx}/civil/getCMByPlate?plate=一键通活动"><button type="button" class="btn btn-default">更多>></button></a></div>
	  		</div>
			
				<hr style="margin-top: 0px;margin-bottom: 10px;border-top: 2px solid #eee;">
				<table class="table nav-table zc-table">
				<col width="70%"></col>
				<col width="30%"></col>
				<c:if test="${empty kuaixun}">							
					<tr>
				  		<td></td>
				  		<td></td>
					</tr>
				</c:if>
				<c:if test="${not empty kuaixun}">
					<c:forEach items="${kuaixun}" var="pol"> 
						<c:if test="${pol.plate == '一键通活动'}">
							<tr>
						  		<td><a href="${ctx}/civil/getCM?id=${pol.id}">${pol.title} </a></td>
						  		<td>${pol.createTime}</td>
							</tr>
						</c:if>
					</c:forEach>
				</c:if>
			</table>
			</div>
		</div>
	</div>

	<h4 class="text-left">一键通合作企业</h4>
        <hr style="margin-top: 0px;margin-bottom: 10px;border-top: 2px solid #eee;">
        <table class="table nav-table">
			<col width="20%"></col>
			<col width="20%"></col>
			<col width="20%"></col>
			<col width="20%"></col>
			<col width="20%"></col>
			<c:forEach var="o" items="${groupList}" varStatus="st">
	       		<c:if test="${st.index == 0 || st.index == 5 }">				
					<tr>
				</c:if>	
						<td><a href="${o.groupHttp}"> ${o.groupName}</a></td>
				<c:if test="${st.index == 4 || st.index == 10 }">				
					</tr>
				</c:if>	
			</c:forEach>
		</table>	
</div>
</body>
</html>